package a3_p04_ak_fh;

import org.jgrapht.graph.DefaultWeightedEdge;

import a2_p04_ak_fh.AttVertex;

public class FibHeapElement {
		//Attriubte
		private AttVertex vertex;
		private DefaultWeightedEdge edge;
		
		public FibHeapElement(AttVertex vertex,DefaultWeightedEdge edge) {
			this.vertex=vertex;
			this.edge=edge;
		}
		
		public AttVertex getVertex() {
			return this.vertex;
		}
		
		public DefaultWeightedEdge getEdge() {
			return this.edge;
		}

		public void setVertex(AttVertex vertex){
			this.vertex=vertex;
		}
		
		public void setEdge(DefaultWeightedEdge edge){
			this.edge=edge;
		}
		public String toString() {
			return vertex.toString() + " " + edge.toString();
			
		}
		
		  @Override
		  public boolean equals(Object other) {
		    if(other == this) {
		      return true;
		    }
		    if(!(other instanceof FibHeapElement)) {
		      return false;
		    }
		    return this.vertex.equals(((FibHeapElement)other).vertex)&&this.edge.equals(((FibHeapElement)other).edge);
		  }
		  
		   @Override
		    public int hashCode() {
		        return this.vertex.hashCode();
		    }
}
